#pragma once
#include "ReportTextInfo.h"
#include "ReportLine.h"
#include "FormRunDoc.h"
class CReportDraw
{
public:
	CReportDraw(void);
	~CReportDraw(void);

	// UserStringToFormatted0a
	static CString UserStringToFormatted0a(CFormRunDoc* pDoc , int index);
	static CString UserStringToFormatted1a(CFormRunDoc* pDoc , int index);
	static CString UserStringToFormatted2a(CFormRunDoc* pDoc , int index);
	static CString FormatUserString(CFormRunDoc* pDoc,int index,int editidex, BOOL bZero );
	static void ClearCrossLine(CFormRunDoc* pDoc,CDC *pDC);
	static CRect WorkOutTheDrawLineRect( CFormRunDoc* pDoc);
	// LocateThePreviousEditCtrl
	static int LocateThePreviousEditCtrl(CFormRunDoc* pDoc, RECT rect);


	static CString DotString(CString sorg,	CReportTextInfo* pInfo,CFormRunDoc* pDoc ,CString dotdefault);
	static CString ProduceSpacialFormat(CReportTextInfo* pReportInfo,CString s);

	
	static bool IsPrePostEditFontSame(LOGFONT PrevEdit,LOGFONT PostEdit);
	static void LOGFONTAssignValue(LPLOGFONT DestineLogFont,LOGFONT SourceLogFont);

	static void OnDrawFSBlank(CDC* pDC,CReportTextInfo* pTempText,int TotalRowsInEdit,int TotalTextHeight);	
	static void DrawBitmap( CDC *pDC, HBITMAP hBitmap, HPALETTE hPal, CRect rect, int bl=1 );

	// LocateKeyEditCtrl
	static int LocateKeyEditCtrl(CFormRunDoc* pDoc, long iRow, long iCol, long iLockRow, long iLockCol, 
		long iLock, bool& bTop, bool& bLeft, bool& bBottom,int nFlag);

	static int GetColsOfRow(CFormRunDoc *pDoc,int iRow);
	static CReportTextInfo* LocateTheEditCtrl(CFormRunDoc* pDoc,CPoint point);
};

